package com.feifan.monthhelper.db.dao;

import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;

import com.feifan.monthhelper.bean.db.MenstrualBloodBean;

import java.util.List;

@Dao
public interface MenstrualBloodDao {

    @Query("Select * from menstrual_blood")
    List<MenstrualBloodBean> getAll();

    @Query("Select * from menstrual_blood Where date = (:date)")
    MenstrualBloodBean loadByDate(long date);

    @Update
    void update(MenstrualBloodBean... users);

    @Insert
    void insertAll(MenstrualBloodBean... users);
}
